<!--头部公共部分-->
{include file="common/header" /}
<div style="padding:15px;">

    <script>
            var room_json = eval('{$room_json}');
            console.log(room_json)
            for(var a = 0; a < room_json.length; a ++){
                document.write('<div class="layui-form-item" style="text-align: center">');
                document.write('<button  class="layui-btn layui-btn-normal"  style="width: 200px;" onclick="classForm_room(this)" ><input type="hidden" name="class_id" value="'+room_json[a].room_id+'">'+room_json[a].room_name+'</button>');
                document.write('<div class="layui-form-item" style="text-align: center">');
                document.write('<br>');

            }
        </script>

</div>
<!--底部公共部分-->
{include file="common/footer" /}


<script>



    function classForm_room(obj)
    {
        var id = $(obj).find("input[name='class_id']").val();
        var room_name = "";
        for(var a = 0; a < room_json.length; a ++){
            if(room_json[a].room_id == id){
                room_name = room_json[a].room_name;
                break;
            }
        }
        parent.setClass_id(id,room_name); //这是父页面函数

        let index = parent.layer.getFrameIndex(window.name);
        parent.layer.close(index);
    }



    layui.use(['table', 'jquery', 'form', 'layer', 'element', 'laydate'], function () {
        let $ = layui.jquery
            , layer = layui.layer
            , table = layui.table
            , laydate = layui.laydate
            , element = layui.element
            , form = layui.form;



    });

</script>